package com.tiennt.android.callnotes;

import com.tiennt.android.callnotes.activities.CallLogActivity;
import com.tiennt.android.callnotes.activities.ContactsActivity;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		// Dashboard News feed button
		Button btnNotes = (Button) findViewById(R.id.btn_notes);

		// Dashboard Friends button
		Button btnContacts = (Button) findViewById(R.id.btn_contacts);

		// Dashboard Messages button
		Button btnCallLogs = (Button) findViewById(R.id.btn_callogs);

		// Dashboard Places button
		Button btnSettings = (Button) findViewById(R.id.btn_settings);

		btnNotes.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent iViewNotes = new Intent(MainActivity.this,
						ViewNotesActivity.class);
				startActivity(iViewNotes);
			}
		});

		btnContacts.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent iViewContacts = new Intent(MainActivity.this,
						ContactsActivity.class);
				startActivity(iViewContacts);

			}
		});

		btnCallLogs.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

				Intent iViewContacts = new Intent(MainActivity.this,
						CallLogActivity.class);
				startActivity(iViewContacts);
			}
		});

		btnSettings.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

			}
		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
}
